package com.dogborther;

import com.dogborther.splash.MainSplash;
import com.dogborther.view.MenuView;
import de.felixroske.jfxsupport.AbstractJavaFxApplicationSupport;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Arrays;
import java.util.Collection;


@SpringBootApplication(scanBasePackages = "com.dogborther")
@Slf4j
public class LemonApplication extends AbstractJavaFxApplicationSupport {

    public static void main(String[] args) {
        LemonApplication.launch(LemonApplication.class, MenuView.class,new MainSplash(),args);
    }

    @Override
    public void init() throws Exception {
        super.init();
    }

    @Override
    public void start(Stage stage) throws Exception {
        super.start(stage);
    }

    @Override
    public void stop() throws Exception {
        super.stop();
    }

    @Override
    public void beforeShowingSplash(Stage splashStage) {
        super.beforeShowingSplash(splashStage);
    }

    @Override
    public Collection<Image> loadDefaultIcons() {
        return Arrays.asList(new Image("/image/icon.jpg"));
    }

    @Override
    public void beforeInitialView(Stage stage, ConfigurableApplicationContext ctx) {
        stage.setTitle("菜单");
        stage.setWidth(1300);
        stage.setHeight(900);
    }

}
